package com.example.springbootest.controller;

import com.example.springbootest.entity.AjaxResult;
import com.example.springbootest.entity.Product;
import com.example.springbootest.entity.Result;
import com.example.springbootest.service.ProductService;
import com.example.springbootest.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (Product)表控制层
 *
 * @author makejava
 * @since 2021-08-06 09:17:40
 */
@RestController
@RequestMapping("product")
public class ProductController {
    /**
     * 服务对象
     */
    @Resource
    private ProductService productService;


    @Autowired
    private TestService testService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public AjaxResult selectOne(Integer id) {
        String show = testService.show();
        return Result.success(show);
    }

}
